package com.yamanyar.weebill.service;

import java.util.List;

import org.springframework.transaction.annotation.Transactional;

import com.yamanyar.weebill.domain.Action;

/**
 * Services for Action. These services uses data access objects for persistence
 * operations or any kind of calculation that might be needed.
 * 
 * Created in Jun 28, 2008.
 * 
 * @author Kaan Yamanyar
 */
public interface ActionService {

	/**
	 * Persists the given action.
	 * 
	 * @param action
	 */
	@Transactional
	public void createNew(Action action);

	/**
	 * Returns the list of all actions.
	 * 
	 * @return all the actions in the system.
	 */
	public List<Action> findAll();

	/**
	 * Return a list of action with the given name.
	 * 
	 * @param name
	 *            name of the action.
	 * @return list of actions.
	 */
	public List<Action> findByName(String name);

	/**
	 * Returns the required Action with given id
	 * 
	 * @param id
	 *            id of the requested Action
	 * @return Required Action
	 */
	public Action getActionWithID(Long id);

}
